<?php

$config = array(
	'register' => array(
		array(
			'field' => 'username',
			'label' => '사용자명',
			'rules' => 'required|alpha_dash|min_length['.USERNAME_MIN_LENGTH.']|max_length['.USERNAME_MAX_LENGTH.']'
		),
		array(
			'field' => 'password',
			'label' => '비밀번호',
			'rules' => 'required|min_length['.PASSWORD_MIN_LENGTH.']|max_length['.PASSWORD_MAX_LENGTH.']'
		),
		array(
			'field' => 'password_confirm',
			'label' => '비밀번호 확인',
			'rules' => 'required|match[password]'
		),
		array(
			'field' => 'name',
			'label' => '이름',
			'rules' => 'required|max_length['.USERNAME_MAX_LENGTH.']'
		),
		array(
			'field' => 'birthday',
			'label' => '생년월일',
			'rules' => 'required|valid_date[y-m-d,-]'
		),
		array(
			'field' => 'gender',
			'label' => '성별',
			'rules' => 'required'
		),
		array(
			'field' => 'education',
			'label' => '최종학력',
			'rules' => 'required'
		),
		array(
			'field' => 'phone',
			'label' => '전화번호',
			'rules' => ''
		),
		array(
			'field' => 'email',
			'label' => '이메일 주소',
			'rules' => 'required|valid_email'
		),
		array(
			'field' => 'address1_id',
			'label' => '주소',
			'rules' => 'required|integer'
		),
		array(
			'field' => 'address2_id',
			'label' => '주소',
			'rules' => 'required|integer'
		),
		array(
			'field' => 'address3_id',
			'label' => '주소',
			'rules' => 'required|integer'
		),
		array(
			'field' => 'address_detail',
			'label' => '상세주소',
			'rules' => 'required'
		),
		array(
			'field' => 'category',
			'label' => '관심 카테고리',
			'rules' => 'required'
		),
		array(
			'field' => 'keyword',
			'label' => '관심 키워드',
			'rules' => 'required'
		)
	),
	
	'login' => array(
		array(
			'field' => 'username',
			'label' => '사용자명',
			'rules' => 'required|alpha_dash|min_length['.USERNAME_MIN_LENGTH.']|max_length['.USERNAME_MAX_LENGTH.']'
		),
		array(
			'field' => 'password',
			'label' => '비밀번호',
			'rules' => 'required|min_length['.PASSWORD_MIN_LENGTH.']|max_length['.PASSWORD_MAX_LENGTH.']'
		)
	),
	
	'create_poll' => array(
		array(
			'field' => 'title',
			'label' => '설문 제목',
			'rules' => 'required'
		),
		array(
			'field' => 'category',
			'label' => '설문 분류',
			'rules' => 'required'
		),
		array(
			'field' => 'keyword',
			'label' => '키워드',
			'rules' => 'required'
		),
		array(
			'field' => 'poll_start',
			'label' => '설문 시작시점',
			'rules' => 'required'
		),
		array(
			'field' => 'poll_end',
			'label' => '설문 종료시점',
			'rules' => 'required'
		),
		array(
			'field' => 'questions[]',
			'label' => '설문 항목',
			'rules' => 'required'
		)
	),
	
	'create_location' => array(
		array(
			'field' => 'address_id',
			'label' => '주소',
			'rules' => 'required'
		),
		array(
			'field' => 'address',
			'label' => '주소',
			'rules' => 'required'
		),
		array(
			'field' => 'lat',
			'label' => '위도',
			'rules' => 'required|numeric'
		),
		array(
			'field' => 'lng',
			'label' => '경도',
			'rules' => 'required|numeric'
		),
		array(
			'field' => 'radius',
			'label' => '반경',
			'rules' => 'required|greater_than[10]|less_than[3000]'
		)
	)
);

?>